package com.test.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

public class HelloWorldWithoutReturnModelAndViewController extends AbstractController {

	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		response.getWriter().write("Hello World!!");
		System.out.println("test...HelloWorldWithoutReturnModelAndViewController......");
		//如果想直接在该处理器/控制器写响应可以通过返回null告诉DispatcherServlet自己已经写出响应了，不需要它进行视图解析
		return null;
	}

}
